home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / prog / pas_all.zip / TI744.ASC < prev    next >
Text File  |  1992-05-13  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Turbo Pascal                           NUMBER  :  744
  9.   VERSION  :  1.0
  10.        OS  :  Windows
  11.      DATE  :  May 13, 1992                             PAGE  :  1/2
  12.  
  13.     TITLE  :  Creating and Using Fonts in the Resource Workshop
  14.  
  15.  
  16.  
  17.  
  18.   Detailed below is a step by step description of how a Windows
  19.   font file (.FON) is created using Borland's Resource Workshop and
  20.   Turbo Pascal for Windows.
  21.  
  22.   1. With the Resource Workshop, create a Resource file and save it
  23.   to a file in compiled .RES format.. This is best done by creating
  24.   a resource script (a file with the extension .RC) and selecting
  25.   the .RES option for MultiSave found in the File/Preferences menu.
  26.  
  27.   2. In Turbo Pascal for Windows, create a library similar to the
  28.   one described below.
  29.  
  30.   library NewFont;
  31.   {$D FONTRES 100,96,96 : NewFont 12 (VGA res)}
  32.   {$M 1024, 0}
  33.   {$R NewFont}
  34.   begin
  35.   end.
  36.  
  37.   The font  NewFont is used in this example.  You may give your
  38.   fonts any name desired.  Of the compiler directives, the
  39.   Description directive gives the resolution of the font and
  40.   provides a description of the font.  In the example, the values
  41.   100, 96, 96 represent the Aspect, LogPixelsX, LogPixelsY for the
  42.   device normally used with the font (in this case VGA). Aspect is
  43.   calculated from the expression (100*AspectY) div (AspectX).  The
  44.   values AspectX, AspectY, LogPixelsX, and LogPixelsY are
  45.   accessible through the API function GetDeviceCaps.
  46.  
  47.   If you like, you may have more than one set of Aspect, LogPixelX,
  48.   and LogPixelY values.  For NewFont, this could take the form of
  49.   the following.  Each set of values is separated by a semi-colon
  50.   and space.
  51.  
  52.   {$D FONTRES 100,96,96; 200,96,48; 133,96,72 :
  53.               NewFont 12 (VGA res)}
  54.  
  55.   For font files, the description directive must start with the
  56.   term FONTRES in order for the font to be recognized as a valid
  57.   Windows font file.  It is also very important not to separate
  58.   values within a set of Aspect, LogPixelX, LogPixelY values with
  59.   spaces.  Windows may not recognize a file with values so
  60.   delimited.
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  Turbo Pascal                           NUMBER  :  744
  75.   VERSION  :  1.0
  76.        OS  :  Windows
  77.      DATE  :  May 13, 1992                             PAGE  :  2/2
  78.  
  79.     TITLE  :  Creating and Using Fonts in the Resource Workshop
  80.  
  81.  
  82.  
  83.  
  84.   3. Compile the library just created to a .DLL file.
  85.  
  86.   4. Rename the .DLL file to one with the extension .FON.  In the
  87.   case of NewFont, NEWFONT.DLL would be renamed to NEWFONT.FON.
  88.  
  89.   5. Often, .FON are copied into the Windows directory
  90.   \WINDOWS\SYSTEM and then added using the Control Panel program.
  91.  
  92.   Note, Microsoft's Control Panel program may not function
  93.   correctly with fonts that do encompass the entire alphabet.
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.